<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="order/include :: header"></head>

<body class="gray-bg">
	<div class="wrapper wrapper-content ">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-content">
					    <div class="columns pull-right" role="group">
							<button class="btn btn-success" id="daYin" onclick="daY()">
								<i class="fa fa-print" aria-hidden="true"></i>打印
							</button>
						</div>
						<div class="form-horizontal m-t" id="signupForm">
							<!-- <input type="hidden" th:value="${nodirectList.id}" id="id" name="id"> -->
							<table class="table table-bordered table-condensed">
								<tbody>
								<tr>
									<th class="required" style="width: 15%;">供应商名称:</th>
									<td  colspan="3" style="width: 80%;" th:text="${lineDetail.supplyName}"></td>
								</tr>
								<tr>
									<th class="required" style="width: 15%;">商品名称:</th>
									<td  colspan="3" style="width: 80%;" th:text="${lineDetail.productName}"></td>
								</tr>
								<tr>
									<th class="required" style="width: 15%;">简称:</th>
									<td  colspan="3" style="width: 80%;" th:text="${lineDetail.shortTitle}"></td>
								</tr>
								<tr>
									<th class="required">商品规格&单位:</th>
									<td style="width: 40%;"th:text="${lineDetail.specTitle }"></td>
									<th class="required" >分拣商品数量:</th>
									<td   style="width: 30%;" th:text="${lineDetail.alltotal}"></td>
								</tr>
								</tbody>
							</table>
						</div>

						<div class="ibox-title">
							<h5>线路明细</h5>
						</div>
						<div class="form-horizontal m-t">
						    <div style="float: left; width: 100%">
						    <block th:each="item, itemstart:${lineDetail.centreLines}">
							<table class="table table-bordered table-condensed">
								<thead>
									<tr>
										<th style="width: 10%; text-align:center;" th:text="${item.centreNm}+'/线路'"></th>
										<th style="width: 10%;">规格</th>
										<th style="width: 15%;">线路分拣数量【合计：<block  th:text="${item.prodSum}+' 份'"></block>】</th>
										<th style="width: 50%;">门店商品分拣明细</th>
										<th style="width: 15%;">物流清单备注(用于区分清单)</th>
									</tr>
								</thead>
								<block th:each="line, linestart:${item.lineList}">
								 <tbody>
										<td style="text-align:center;" th:text="${line.flowName}"></td>
										<td  th:text="${line.spectTitle}"> </td>
										<td  th:text="${line.total}+'份'"> </td>
										<td  th:text="${line.tuanzhang}"> </td>
										<td  th:text="${line.remark}"> </td>
									</tr>
								</tbody>
								</block>
							</table>
							</block>
							</div>
							 
							 
							 
							<table>

							</table>
							<div class="form-group text-center">
								<div class="col-sm-8 col-sm-offset-2">
									<div class="btn btn-danger" onclick="closeDow()" id="gBi"><i class="fa fa-remove"></i> 关闭</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>

	</div>
	<div th:include="order/include::footer"></div>
	<script type="text/javascript">
		function closeDow() {
			var index = parent.layer.getFrameIndex(window.name); // 获取窗口索引
			parent.layer.close(index);
		}
		
		function daY() {
			if(confirm('确认打印吗？')){
			   document.getElementById('daYin').style.display="none";//隐藏打印按钮
			   document.getElementById('gBi').style.display="none";//隐藏关闭按钮
			   window.print();//打印
			   document.getElementById('daYin').style.display="inline";//打印完后显示打印按钮
			   document.getElementById('gBi').style.display="inline";//打印完后显示关闭按钮
			}
		}
	</script>
</body>
</html>
